#ifndef POPUPLISTWIDGET_H
#define POPUPLISTWIDGET_H

#include <QPainter>
#include <QPaintEvent>
#include <QMouseEvent>
#include <QListWidget>
#include <QTextEdit>

class PopupListWidget : public QListWidget
{
    Q_OBJECT
public:
    PopupListWidget(QWidget*parent=nullptr);
protected:
    bool eventFilter(QObject *obj, QEvent *event)override;
    void showEvent(QShowEvent*e)override;
    void hideEvent(QHideEvent*e)override;
};

class PopupWidget : public QWidget
{
    Q_OBJECT
public:
    PopupWidget(QWidget*parent=nullptr);
protected:
    bool eventFilter(QObject *obj, QEvent *event)override;
    void showEvent(QShowEvent*e)override;
    void hideEvent(QHideEvent*e)override;
};

class PopupTextEdit:public QTextEdit
{
    Q_OBJECT
public:
    PopupTextEdit(QWidget*parent=nullptr);
protected:
    bool eventFilter(QObject *obj, QEvent *event)override;
    void showEvent(QShowEvent*e)override;
    void hideEvent(QHideEvent*e)override;
};

#endif // POPUPLISTWIDGET_H
